<?php /* Smarty version Smarty-3.1.12, created on 2013-06-09 10:07:24
         compiled from "D:\mxx\sys-admin\template\cms\template_list.htm" */ ?>
<?php /*%%SmartyHeaderCode:251b3e35cecd011-24089332%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c045c6866b891ef27cd9c1c3702c39c11e6df2d7' => 
    array (
      0 => 'D:\\mxx\\sys-admin\\template\\cms\\template_list.htm',
      1 => 1366303884,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '251b3e35cecd011-24089332',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'templates' => 0,
    'tp' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_51b3e35d070846_20782703',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51b3e35d070846_20782703')) {function content_51b3e35d070846_20782703($_smarty_tpl) {?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/sys-admin/css/general.css" rel="stylesheet" type="text/css">
<link href="/sys-admin/css/main.css" rel="stylesheet" type="text/css">
<script src="/sys-admin/js/jquery.js" type="text/javascript"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="/sys-admin/action/cms/template.php?met=addui">添加模板</a></span>
<span id="search_id" class="action-span1">模板管理</span>
</h1>
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th class="num">#</th>
    <th>名称</th>
    <th>类型</th>
    <th>文件名</th>
    <th>文件路径</th>
    <th>操作</th>
  </tr>
  <?php  $_smarty_tpl->tpl_vars['tp'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tp']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['templates']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['i']['index']=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['tp']->key => $_smarty_tpl->tpl_vars['tp']->value){
$_smarty_tpl->tpl_vars['tp']->_loop = true;
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['i']['index']++;
?>
  <tr id="tp_<?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_id'];?>
">
	<td class="num"><?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['i']['index']+1;?>
</td>
	<td><?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_name'];?>
</td>
	<td><?php if ($_smarty_tpl->tpl_vars['tp']->value['tp_type']==1){?>独立<?php }else{ ?>共用<?php }?></td>
	<td><?php echo $_smarty_tpl->tpl_vars['tp']->value['file_name'];?>
</td>
	<td><?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_path'];?>
</td>
	<td>
	<a href="javascript:delTemplate(<?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_id'];?>
);">删除</a>
	<a href="/sys-admin/action/cms/template.php?met=download&id=<?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_id'];?>
">下载</a>
	<a href="/sys-admin/action/cms/template.php?met=editui&id=<?php echo $_smarty_tpl->tpl_vars['tp']->value['tp_id'];?>
">修改</a>
	</td>
  </tr>
  <?php } ?>
</table>
</div>
<script type="text/javascript">
function delTemplate(id){
	if(confirm("确定要删除该模板?")){
		$.get('/sys-admin/action/cms/template.php?met=delete&id='+id+'&t='+(new Date().getTime()),null,function(result){
			if($.trim(result) == "1"){
				alert("模板删除成功");
				document.location.reload();
			}else{
				alert("模板删除失败");
			}
		});
	}
}
</script>
</body></html><?php }} ?>